#ifndef __CONFIGURATION_H
#define __CONFIGURATION_H
#include <map>
#include <string>
using std::map;
using std::string;
// 单例模式私有化构造函数和析构函数
class Configuration
{
public:
    static Configuration *getinstance()
    {
        if (_con == nullptr)
        {
            _con = new Configuration();
        }
        return _con;
    }
    static void destory()
    {
        if (_con != nullptr)
        {
            delete _con;
            _con = nullptr;
        }
    }
    void read();
    map<string,string> & get();
    Configuration(const Configuration &con) = delete;
    Configuration &operator=(const Configuration &con) = delete;
    Configuration(Configuration &&con) = delete;

private:
    static Configuration *_con;
    Configuration();
    ~Configuration();
    map<string, string> _map;
};


#endif
